package com.kate.mall.bff.wx.java8;

import java.util.function.Function;

/**
 * @author 新梦想.陈超
 * @version 2021.2
 * @Description: {TODO}
 * @date 2023/3/13 下午4:23
 */

public class _02_Array_Ref {
    /*
       数组引用
           格式
           Type::new
        */
    public static void test() {
        Function<Integer, String[]> function = (x) -> new String[x];
        function.apply(20);
        // 数组引用
        Function<Integer, String[]> function1 = String[]::new;
        String[] strArray = function1.apply(20);
        System.out.println(strArray.length);
    }


}
